<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.db.conn"%>
<%@ page import="java.sql.*"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
<jsp:include flush="true" page="${basePath}/admin/head.jsp"></jsp:include>
<style>
    .ms-panel {
        margin: 0;
        padding: 0;
        background: #fff;
        border-radius: 4px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    }
    
    .ms-panel-header {
        padding: 20px 24px;
        border-bottom: 1px solid #eee;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .ms-panel-header h6 {
        margin: 0;
        font-size: 18px;
        font-weight: 500;
        color: #333;
    }
    
    .ms-panel-body {
        padding: 24px;
    }
    
    .user-detail-container {
        max-width: 800px;
        margin: 0 auto;
        padding: 20px;
    }
    
    .user-info-table {
        width: 100%;
        border-collapse: collapse;
    }
    
    .user-info-table td {
        padding: 16px;
        border-bottom: 1px solid #eee;
    }
    
    .user-info-table td:first-child {
        width: 200px;
        color: #666;
        font-weight: 500;
        text-align: right;
        padding-right: 24px;
        background: #f8f9fa;
    }
    
    .user-info-table td:last-child {
        color: #333;
        text-align: left;
        font-size: 15px;
    }
    
    .user-avatar {
        width: 120px;
        height: 120px;
        border-radius: 50%;
        object-fit: cover;
        border: 3px solid #fff;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .info-group {
        display: flex;
        gap: 24px;
        align-items: center;
    }
    
    .info-item {
        display: flex;
        align-items: center;
        gap: 8px;
    }
    
    .info-label {
        color: #666;
        font-size: 14px;
    }
    
    .info-value {
        color: #333;
        font-size: 15px;
        font-weight: 500;
        padding: 4px 12px;
        background: #f8f9fa;
        border-radius: 4px;
        border: 1px solid #e0e0e0;
    }
    
    .info-value.gender {
        text-transform: capitalize;
    }
    
    .info-value.age {
        min-width: 60px;
    }
    
    .btn-return {
        display: inline-flex;
        align-items: center;
        padding: 8px 24px;
        background: #007bff;
        color: #fff;
        border: none;
        border-radius: 4px;
        cursor: pointer;
        font-size: 14px;
        transition: all 0.3s ease;
        text-decoration: none;
        margin-top: 24px;
    }
    
    .btn-return:hover {
        background: #0056b3;
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .btn-return:before {
        content: "←";
        margin-right: 8px;
        font-size: 16px;
    }
    
    .action-row {
        text-align: center;
        padding-top: 24px;
    }
</style>
 </head>

 <body class="ms-body ms-aside-left-open ms-primary-theme ms-has-quickbar">
    <!-- Body Content Wrapper -->
    <div class="ms-content-wrapper">
        <div class="row">
            <div class="col-md-12">
                   <div class="ms-panel">
        <div class="ms-panel-header">
            <h6>用户详情</h6>
        </div>
        <div class="ms-panel-body">
            <div class="user-detail-container">
                <%
                    conn cn = new conn();
                    String id = request.getParameter("id");
                    String sql = "select * from member where mid=" + id;
                    ResultSet rs = cn.query(sql);
                    rs.next();
                %>
                <table class="user-info-table">
                    <tr>
                        <td>微信昵称</td>
                        <td><%=rs.getString("nic") %></td>
                    </tr>
                    <tr>
                        <td>微信头像</td>
                        <td>
                            <img src="<%=rs.getString("photo") %>" alt="用户头像" class="user-avatar" />
                        </td>
                    </tr>
                    <tr>
                        <td>基本信息</td>
                        <td>
                            <div class="info-group">
                                <div class="info-item">
                                    <span class="info-label">姓名：</span>
                                    <span class="info-value"><%=rs.getString("mname") %></span>
                                </div>
                                <div class="info-item">
                                    <span class="info-label">性别：</span>
                                    <span class="info-value gender"><%=rs.getString("sex") %></span>
                                </div>
                                <div class="info-item">
                                    <span class="info-label">年龄：</span>
                                    <span class="info-value age"><%=rs.getString("age") %></span>
                                </div>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <td>手机号码</td>
                        <td><%=rs.getString("tel") %></td>
                    </tr>
                    <tr>
                        <td>注册时间</td>
                        <td><%=rs.getString("atime") %></td>
                    </tr>
                </table>
                
                <div class="action-row">
                    <a href="javascript:history.go(-1);" class="btn-return">返回</a>
                </div>
            </div>
        </div>
    </div>

            </div>
        </div>
    </div>

    <%
        if (rs != null)
            rs.close();
        if (cn != null)
            cn.close();
    %>
</body>
</html>


